# -*- coding:utf-8 -*-
import json
import re
import sys

import os

import web

reload(sys)
sys.setdefaultencoding('utf-8')

from mymodule import getData, structapp, run, task, train
from mymodule.config import *

urls = (
     '/', 'index',
    '/getdata', getData.getData_app,
    '/structapp', structapp.struct_app,
    '/train',train.train_app,
    '/task',task.task_app,
    # '/force','force_stop',
     '/test','test',
    # '/structdata','structdata',
    # '/structd','structd',
    '/run', run.run_app,
    #  '/stop', 'stop',
    # '/gettpl','gettpl',
    # '/pause','pause',
    # '/yema','yema'
)


# application = web.application(urls, globals(),True).wsgifunc()
application = web.application(urls, globals())

#主界面
class index:
    def GET(self,):
        return 'hello'
class test:
    def GET(self,):
        return 'hello test'





if __name__ == "__main__":
    app = web.application(urls, globals())
    app.run()